// retail_definition.js

export const RetailDefinition = {
    // 默认多页加载每页长度
    gDefaultPageSize: 30
};

// 支付方式类型
export const RetailFundType = {
    OtherPay: { name: '其他支付', code: 0 },
    Cash: { name: '现金', code: 1 },
    Wechat: { name: '微信', code: 2 },
    AliPay: { name: '支付宝', code: 3 },

    fromCode(code) {
        return Object.values(RetailFundType).find(item => item.code === code);
    }
};

// 收款方式类型
export const RetailPayMethod = {
    SingleMethod: { name: '标准收款', code: 0 },
    ComposeMethod: { name: '组合收款', code: 1 },

    fromCode(code) {
        return Object.values(RetailPayMethod).find(item => item.code === code);
    }
};

// 前端设备类型
export const RetailFrontendDevInputType = {
    TouchScreen: { name: '触摸屏', code: 0 },
    Mouse: { name: '鼠标', code: 1 },

    fromCode(code) {
        return Object.values(RetailFrontendDevInputType).find(item => item.code === code);
    }
};
